## pval_cutoff: 0.05
## lfc_cutoff: 1
## low_counts_cutoff: 10
General statistics
# Number of samples
length(counts_data)
## [1] 6
# Number of genes
nrow(counts_data)
## [1] 49315
# Total counts
colSums(counts_data)
## SRR13535276 SRR13535278 SRR13535280 SRR13535300 SRR13535302 SRR13535304
## 5442647 5284506 6692745 6783939 5245017 3380080

Create DDS objects
# Create DESeqDataSet object
dds <- get_DESeqDataSet_obj(counts_data, ~ treatment)
## [1] TRUE
## [1] TRUE
## [1] "DESeqDataSet object of length 49315 with 0 metadata columns"
## [1] "DESeqDataSet object of length 13961 with 0 metadata columns"
colData(dds)
## DataFrame with 6 rows and 25 columns
## Assay Type AvgSpotLen Bases BioProject BioSample Bytes Center Name Consent DATASTORE filetype DATASTORE provider DATASTORE region Experiment treatment GEO_Accession (exp) Instrument LibraryLayout LibrarySelection LibrarySource Organism Platform label ReleaseDate Sample Name source_name SRA Study
## <character> <numeric> <numeric> <character> <character> <numeric> <character> <character> <character> <character> <character> <character> <factor> <character> <character> <character> <character> <character> <character> <character> <factor> <POSIXct> <character> <character> <character>
## SRR13535276 RNA-Seq 300 8225466000 PRJNA694971 SAMN17588686 3252113587 GEO public fastq,sra gs,ncbi,s3 gs.US,ncbi.public,s3.us-east-1 SRX9943360 A GSM5043430 Illumina HiSeq 2500 PAIRED cDNA TRANSCRIPTOMIC Mus musculus ILLUMINA in space without gravity 2021-09-09 GSM5043430 C2C12 proliferating myoblasts SRP303354
## SRR13535278 RNA-Seq 300 9203426700 PRJNA694971 SAMN17588684 3619152333 GEO public fastq,sra gs,ncbi,s3 gs.US,ncbi.public,s3.us-east-1 SRX9943362 A GSM5043433 Illumina HiSeq 2500 PAIRED cDNA TRANSCRIPTOMIC Mus musculus ILLUMINA in space without gravity 2021-09-09 GSM5043433 C2C12 proliferating myoblasts SRP303354
## SRR13535280 RNA-Seq 300 9323939700 PRJNA694971 SAMN17588682 3735905901 GEO public fastq,sra gs,ncbi,s3 gs.US,ncbi.public,s3.us-east-1 SRX9943364 A GSM5043436 Illumina HiSeq 2500 PAIRED cDNA TRANSCRIPTOMIC Mus musculus ILLUMINA in space without gravity 2021-09-09 GSM5043436 C2C12 proliferating myoblasts SRP303354
## SRR13535300 RNA-Seq 300 12820015200 PRJNA694971 SAMN17587361 5047533646 GEO public fastq,sra gs,ncbi,s3 gs.US,ncbi.public,s3.us-east-1 SRX9943384 E GSM5043471 Illumina HiSeq 2500 PAIRED cDNA TRANSCRIPTOMIC Mus musculus ILLUMINA on land 2021-09-09 GSM5043471 C2C12 proliferating myoblasts SRP303354
## SRR13535302 RNA-Seq 300 12499917600 PRJNA694971 SAMN17587359 4941074444 GEO public fastq,sra gs,ncbi,s3 gs.US,ncbi.public,s3.us-east-1 SRX9943386 E GSM5043475 Illumina HiSeq 2500 PAIRED cDNA TRANSCRIPTOMIC Mus musculus ILLUMINA on land 2021-09-09 GSM5043475 C2C12 proliferating myoblasts SRP303354
## SRR13535304 RNA-Seq 300 7150086300 PRJNA694971 SAMN17587357 2845819297 GEO public fastq,sra gs,ncbi,s3 gs.US,ncbi.public,s3.us-east-1 SRX9943388 E GSM5043478 Illumina HiSeq 2500 PAIRED cDNA TRANSCRIPTOMIC Mus musculus ILLUMINA on land 2021-09-09 GSM5043478 C2C12 proliferating myoblasts SRP303354
Sample-to-sample comparisons
# Transform data (blinded rlog)
rld <- get_transformed_data(dds)
PCA plot
pca <- rld$pca
pca_df <- cbind(as.data.frame(colData(dds)) %>% rownames_to_column(var = 'name'), pca$x)
summary(pca)
## Importance of components:
## PC1 PC2 PC3 PC4 PC5 PC6
## Standard deviation 42.7426 37.4963 27.3551 20.29918 19.16927 1.049e-13
## Proportion of Variance 0.3837 0.2953 0.1572 0.08655 0.07719 0.000e+00
## Cumulative Proportion 0.3837 0.6791 0.8363 0.92281 1.00000 1.000e+00
ggplot(pca_df, aes(x = PC1, y = PC2, color = label)) +
geom_point() +
geom_text(aes(label = name), position = position_nudge(y = -2), show.legend = F, size = 3) +
scale_color_manual(values = colors_default) +
scale_x_continuous(expand = c(0.2, 0))

Correlation heatmap
pheatmap(
cor(rld$matrix),
annotation_col = as.data.frame(colData(dds)) %>% select(label),
color = brewer.pal(8, 'YlOrRd')
)

Wald test results
# DE analysis using Wald test
dds_full <- DESeq(dds)
colData(dds_full)
## DataFrame with 6 rows and 26 columns
## Assay Type AvgSpotLen Bases BioProject BioSample Bytes Center Name Consent DATASTORE filetype DATASTORE provider DATASTORE region Experiment treatment GEO_Accession (exp) Instrument LibraryLayout LibrarySelection LibrarySource Organism Platform label ReleaseDate Sample Name source_name SRA Study sizeFactor
## <character> <numeric> <numeric> <character> <character> <numeric> <character> <character> <character> <character> <character> <character> <factor> <character> <character> <character> <character> <character> <character> <character> <factor> <POSIXct> <character> <character> <character> <numeric>
## SRR13535276 RNA-Seq 300 8225466000 PRJNA694971 SAMN17588686 3252113587 GEO public fastq,sra gs,ncbi,s3 gs.US,ncbi.public,s3.us-east-1 SRX9943360 A GSM5043430 Illumina HiSeq 2500 PAIRED cDNA TRANSCRIPTOMIC Mus musculus ILLUMINA in space without gravity 2021-09-09 GSM5043430 C2C12 proliferating myoblasts SRP303354 0.983326898127425
## SRR13535278 RNA-Seq 300 9203426700 PRJNA694971 SAMN17588684 3619152333 GEO public fastq,sra gs,ncbi,s3 gs.US,ncbi.public,s3.us-east-1 SRX9943362 A GSM5043433 Illumina HiSeq 2500 PAIRED cDNA TRANSCRIPTOMIC Mus musculus ILLUMINA in space without gravity 2021-09-09 GSM5043433 C2C12 proliferating myoblasts SRP303354 1.20126816782016
## SRR13535280 RNA-Seq 300 9323939700 PRJNA694971 SAMN17588682 3735905901 GEO public fastq,sra gs,ncbi,s3 gs.US,ncbi.public,s3.us-east-1 SRX9943364 A GSM5043436 Illumina HiSeq 2500 PAIRED cDNA TRANSCRIPTOMIC Mus musculus ILLUMINA in space without gravity 2021-09-09 GSM5043436 C2C12 proliferating myoblasts SRP303354 1.11440765689284
## SRR13535300 RNA-Seq 300 12820015200 PRJNA694971 SAMN17587361 5047533646 GEO public fastq,sra gs,ncbi,s3 gs.US,ncbi.public,s3.us-east-1 SRX9943384 E GSM5043471 Illumina HiSeq 2500 PAIRED cDNA TRANSCRIPTOMIC Mus musculus ILLUMINA on land 2021-09-09 GSM5043471 C2C12 proliferating myoblasts SRP303354 1.51592028243075
## SRR13535302 RNA-Seq 300 12499917600 PRJNA694971 SAMN17587359 4941074444 GEO public fastq,sra gs,ncbi,s3 gs.US,ncbi.public,s3.us-east-1 SRX9943386 E GSM5043475 Illumina HiSeq 2500 PAIRED cDNA TRANSCRIPTOMIC Mus musculus ILLUMINA on land 2021-09-09 GSM5043475 C2C12 proliferating myoblasts SRP303354 0.802283983223576
## SRR13535304 RNA-Seq 300 7150086300 PRJNA694971 SAMN17587357 2845819297 GEO public fastq,sra gs,ncbi,s3 gs.US,ncbi.public,s3.us-east-1 SRX9943388 E GSM5043478 Illumina HiSeq 2500 PAIRED cDNA TRANSCRIPTOMIC Mus musculus ILLUMINA on land 2021-09-09 GSM5043478 C2C12 proliferating myoblasts SRP303354 0.599688743398815
# Wald test results
res <- results(
dds_full,
contrast = c('treatment', condition, control),
alpha = pval_cutoff
)
res
## log2 fold change (MLE): treatment A vs E
## Wald test p-value: treatment A vs E
## DataFrame with 13961 rows and 6 columns
## baseMean log2FoldChange lfcSE stat pvalue padj
## <numeric> <numeric> <numeric> <numeric> <numeric> <numeric>
## ENSMUSG00000025900 2.61497527977092 -4.96252421751867 2.55325078860844 -1.94361017713553 0.051942477633541 NA
## ENSMUSG00000098104 6.17973004874648 -0.339872391373065 0.953764994703482 -0.356348149974543 0.721579854313533 NA
## ENSMUSG00000033845 78.7389250960824 -0.139776787060921 0.484080078116302 -0.288747241168927 0.772774808478247 0.91975414127928
## ENSMUSG00000102275 1.93535022630578 -0.248188373898377 1.75297446668509 -0.141581282908076 0.887410752060699 NA
## ENSMUSG00000025903 64.5755304394773 -0.218442860316378 0.653768545720143 -0.334128739821457 0.738282413870688 0.907746452476684
## ... ... ... ... ... ... ...
## ENSMUSG00000061654 1.27223045415217 0.825924779695671 3.18450427302358 0.259357409783434 0.795359487691016 NA
## ENSMUSG00000079834 14.0996039438114 1.90361159520279 1.04533718703202 1.82105029728028 0.0685992115490475 0.344032440159195
## ENSMUSG00000095041 158.204029324634 0.140871536720375 0.61223120050344 0.230095324453468 0.818017697977997 0.938168604079398
## ENSMUSG00000063897 20.5239557083965 -0.458057808387794 0.853403061757738 -0.536742635354906 0.591445401225571 0.836773443792051
## ENSMUSG00000095742 7.49461231124379 -0.218512871147228 1.06290732215163 -0.205580361140889 0.837118719387858 NA
mcols(res)
## DataFrame with 6 rows and 2 columns
## type description
## <character> <character>
## baseMean intermediate mean of normalized counts for all samples
## log2FoldChange results log2 fold change (MLE): treatment A vs E
## lfcSE results standard error: treatment A vs E
## stat results Wald statistic: treatment A vs E
## pvalue results Wald test p-value: treatment A vs E
## padj results BH adjusted p-values
summary(res)
##
## out of 13961 with nonzero total read count
## adjusted p-value < 0.05
## LFC > 0 (up) : 239, 1.7%
## LFC < 0 (down) : 104, 0.74%
## outliers [1] : 169, 1.2%
## low counts [2] : 3519, 25%
## (mean count < 8)
## [1] see 'cooksCutoff' argument of ?results
## [2] see 'independentFiltering' argument of ?results
plotDispEsts(dds_full)

Summary details
# Upregulated genes (LFC > 0)
res_sig_df %>% filter(log2FoldChange > 0)
# Downregulated genes (LFC < 0)
res_sig_df %>% filter(log2FoldChange < 0)
# Outliers (pvalue and padj are NA)
res[which(is.na(res$pvalue)), ]
## log2 fold change (MLE): treatment A vs E
## Wald test p-value: treatment A vs E
## DataFrame with 169 rows and 6 columns
## baseMean log2FoldChange lfcSE stat pvalue padj
## <numeric> <numeric> <numeric> <numeric> <numeric> <numeric>
## ENSMUSG00000067780 221.987320791496 -2.58250067154418 1.46924379482918 -1.75770738704698 NA NA
## ENSMUSG00000025981 118.330916745571 -0.529114681877769 1.15228645724284 -0.459186757383075 NA NA
## ENSMUSG00000038349 75.0130587145933 -4.2009078462992 1.26705215301968 -3.31549718477449 NA NA
## ENSMUSG00000026024 42.2766653527863 -3.7206419455677 1.35025225559206 -2.75551618607462 NA NA
## ENSMUSG00000085842 18.6638352368536 6.04611364896142 3.4761934668531 1.73929147114898 NA NA
## ... ... ... ... ... ... ...
## ENSMUSG00000005871 313.558334721303 -0.607218664256476 1.04276744988818 -0.582314555677387 NA NA
## ENSMUSG00000044595 35.3300487472487 1.59557282754048 1.6716228739659 0.954505260959378 NA NA
## ENSMUSG00000024597 269.224401081688 -1.4252106096064 1.09094789247461 -1.30639659275896 NA NA
## ENSMUSG00000033417 193.435350548664 -1.25262638635327 1.07429741513205 -1.16599590458784 NA NA
## ENSMUSG00000064340 120.809089287493 0.332759294173176 1.16820472187092 0.284846729296086 NA NA
# Low counts (only padj is NA)
res[which(is.na(res$padj) & !is.na(res$pvalue)), ]
## log2 fold change (MLE): treatment A vs E
## Wald test p-value: treatment A vs E
## DataFrame with 3519 rows and 6 columns
## baseMean log2FoldChange lfcSE stat pvalue padj
## <numeric> <numeric> <numeric> <numeric> <numeric> <numeric>
## ENSMUSG00000025900 2.61497527977092 -4.96252421751867 2.55325078860844 -1.94361017713553 0.051942477633541 NA
## ENSMUSG00000098104 6.17973004874648 -0.339872391373065 0.953764994703482 -0.356348149974543 0.721579854313533 NA
## ENSMUSG00000102275 1.93535022630578 -0.248188373898377 1.75297446668509 -0.141581282908076 0.887410752060699 NA
## ENSMUSG00000090031 4.72015366818405 2.12451937885759 1.34158979627472 1.58358343567973 0.113288545837362 NA
## ENSMUSG00000098201 1.51075135056325 1.80207939300779 1.8566985086054 0.970582668459924 0.331756140018157 NA
## ... ... ... ... ... ... ...
## ENSMUSG00000065947 5.24532303154048 0.261969679752441 1.04998352551877 0.249498847730023 0.802974932106141 NA
## ENSMUSG00000064366 2.13604339327703 -0.772910994556008 2.41975524758413 -0.319417013488318 0.749410311122562 NA
## ENSMUSG00000064372 6.8623045792859 -0.401501479636286 1.0875874078391 -0.369167091069968 0.712003183607809 NA
## ENSMUSG00000061654 1.27223045415217 0.825924779695671 3.18450427302358 0.259357409783434 0.795359487691016 NA
## ENSMUSG00000095742 7.49461231124379 -0.218512871147228 1.06290732215163 -0.205580361140889 0.837118719387858 NA
Shrunken LFC results
plotMA(res)

# Shrunken LFC results
res_shrunken <- lfcShrink(
dds_full,
coef = str_c('treatment_', condition, '_vs_', control),
type = 'apeglm'
)
res_shrunken
## log2 fold change (MAP): treatment A vs E
## Wald test p-value: treatment A vs E
## DataFrame with 13961 rows and 5 columns
## baseMean log2FoldChange lfcSE pvalue padj
## <numeric> <numeric> <numeric> <numeric> <numeric>
## ENSMUSG00000025900 2.61497527977092 -0.130070165035112 0.514057374800297 0.051942477633541 NA
## ENSMUSG00000098104 6.17973004874648 -0.0711113045892024 0.441210143849429 0.721579854313533 NA
## ENSMUSG00000033845 78.7389250960824 -0.0702828863103979 0.346908974104891 0.772774808478247 0.91975414127928
## ENSMUSG00000102275 1.93535022630578 -0.01751737174174 0.472510831689597 0.887410752060699 NA
## ENSMUSG00000025903 64.5755304394773 -0.0783318923340181 0.396772730730852 0.738282413870688 0.907746452476684
## ... ... ... ... ... ...
## ENSMUSG00000061654 1.27223045415217 0.0194986220204847 0.48485384600122 0.795359487691016 NA
## ENSMUSG00000079834 14.0996039438114 0.414943722202333 0.670690726154159 0.0685992115490475 0.344032440159195
## ENSMUSG00000095041 158.204029324634 0.056308861952675 0.384739422702434 0.818017697977997 0.938168604079398
## ENSMUSG00000063897 20.5239557083965 -0.115423392200944 0.438228224097133 0.591445401225571 0.836773443792051
## ENSMUSG00000095742 7.49461231124379 -0.0384303202988718 0.445850710893363 0.837118719387858 NA
plotMA(res_shrunken)

mcols(res_shrunken)
## DataFrame with 5 rows and 2 columns
## type description
## <character> <character>
## baseMean intermediate mean of normalized counts for all samples
## log2FoldChange results log2 fold change (MAP): treatment A vs E
## lfcSE results posterior SD: treatment A vs E
## pvalue results Wald test p-value: treatment A vs E
## padj results BH adjusted p-values
summary(res_shrunken, alpha = pval_cutoff)
##
## out of 13961 with nonzero total read count
## adjusted p-value < 0.05
## LFC > 0 (up) : 239, 1.7%
## LFC < 0 (down) : 104, 0.74%
## outliers [1] : 169, 1.2%
## low counts [2] : 3519, 25%
## (mean count < 8)
## [1] see 'cooksCutoff' argument of ?results
## [2] see 'independentFiltering' argument of ?results
Summary details
# Upregulated genes (LFC > 0)
res_shrunken_sig_df %>% filter(log2FoldChange > 0)
# Downregulated genes (LFC < 0)
res_shrunken_sig_df %>% filter(log2FoldChange < 0)
# Outliers (pvalue and padj are NA)
res_shrunken[which(is.na(res_shrunken$pvalue)), ]
## log2 fold change (MAP): treatment A vs E
## Wald test p-value: treatment A vs E
## DataFrame with 169 rows and 5 columns
## baseMean log2FoldChange lfcSE pvalue padj
## <numeric> <numeric> <numeric> <numeric> <numeric>
## ENSMUSG00000067780 221.987320791496 -0.241730977673975 0.561932359724209 NA NA
## ENSMUSG00000025981 118.330916745571 -0.0799970361555749 0.459272428578916 NA NA
## ENSMUSG00000038349 75.0130587145933 -3.20423347580803 1.58668667426596 NA NA
## ENSMUSG00000026024 42.2766653527863 -0.466287425847236 0.878919607871857 NA NA
## ENSMUSG00000085842 18.6638352368536 0.0641953569573744 0.495754979206118 NA NA
## ... ... ... ... ... ...
## ENSMUSG00000005871 313.558334721303 -0.10923190382568 0.458138215714532 NA NA
## ENSMUSG00000044595 35.3300487472487 0.122220325999256 0.49498509312571 NA NA
## ENSMUSG00000024597 269.224401081688 -0.252702992806645 0.531987334414787 NA NA
## ENSMUSG00000033417 193.435350548664 -0.225314649729433 0.511857515874439 NA NA
## ENSMUSG00000064340 120.809089287493 0.0514496971459714 0.455209156451693 NA NA
# Low counts (only padj is NA)
res_shrunken[which(is.na(res_shrunken$padj) & !is.na(res_shrunken$pvalue)), ]
## log2 fold change (MAP): treatment A vs E
## Wald test p-value: treatment A vs E
## DataFrame with 3519 rows and 5 columns
## baseMean log2FoldChange lfcSE pvalue padj
## <numeric> <numeric> <numeric> <numeric> <numeric>
## ENSMUSG00000025900 2.61497527977092 -0.130070165035112 0.514057374800297 0.051942477633541 NA
## ENSMUSG00000098104 6.17973004874648 -0.0711113045892024 0.441210143849429 0.721579854313533 NA
## ENSMUSG00000102275 1.93535022630578 -0.01751737174174 0.472510831689597 0.887410752060699 NA
## ENSMUSG00000090031 4.72015366818405 0.285773439986671 0.575076985400405 0.113288545837362 NA
## ENSMUSG00000098201 1.51075135056325 0.122791746077916 0.495431509519151 0.331756140018157 NA
## ... ... ... ... ... ...
## ENSMUSG00000065947 5.24532303154048 0.0481425932620885 0.445980015247602 0.802974932106141 NA
## ENSMUSG00000064366 2.13604339327703 -0.0302867419042347 0.481739447113941 0.749410311122562 NA
## ENSMUSG00000064372 6.8623045792859 -0.0666771353220683 0.45266731583016 0.712003183607809 NA
## ENSMUSG00000061654 1.27223045415217 0.0194986220204847 0.48485384600122 0.795359487691016 NA
## ENSMUSG00000095742 7.49461231124379 -0.0384303202988718 0.445850710893363 0.837118719387858 NA
Visualizing results
Heatmaps
# Plot normalized counts (z-scores)
pheatmap(counts_sig_norm[2:7],
color = brewer.pal(8, 'YlOrRd'),
cluster_rows = T,
show_rownames = F,
annotation_col = as.data.frame(colData(dds)) %>% select(label),
border_color = NA,
fontsize = 10,
scale = 'row',
fontsize_row = 10,
height = 20)

# Plot log-transformed counts
pheatmap(counts_sig_log[2:7],
color = rev(brewer.pal(8, 'RdYlBu')),
cluster_rows = T,
show_rownames = F,
annotation_col = as.data.frame(colData(dds)) %>% select(label),
border_color = NA,
fontsize = 10,
fontsize_row = 10,
height = 20)

# Plot log-transformed counts (top 24 DE genes)
pheatmap((counts_sig_log %>% filter(ensembl_gene_id %in% res_sig_df$ensembl_gene_id[1:24]))[2:7],
color = rev(brewer.pal(8, 'RdYlBu')),
cluster_rows = T,
show_rownames = F,
annotation_col = as.data.frame(colData(dds)) %>% select(label),
fontsize = 10,
fontsize_row = 10,
height = 20)

Volcano plots
# Unshrunken LFC
res_df %>%
mutate(
sig_threshold = if_else(
padj < pval_cutoff & abs(log2FoldChange) >= lfc_cutoff,
if_else(log2FoldChange > 0, 'DE-up', 'DE-down'),
'non-DE'
)
) %>%
filter(!is.na(sig_threshold)) %>%
ggplot() +
geom_point(aes(x = log2FoldChange, y = -log10(padj), colour = sig_threshold)) +
scale_color_manual(values = c('blue', 'red', 'gray')) +
xlab('log2 fold change') +
ylab('-log10 adjusted p-value')

# Shrunken LFC
res_shrunken_df %>%
mutate(
sig_threshold = if_else(
padj < pval_cutoff & abs(log2FoldChange) >= lfc_cutoff,
if_else(log2FoldChange > 0, 'DE-up', 'DE-down'),
'non-DE'
)
) %>%
filter(!is.na(sig_threshold)) %>%
ggplot() +
geom_point(aes(x = log2FoldChange, y = -log10(padj), colour = sig_threshold)) +
scale_color_manual(values = c('blue', 'red', 'gray')) +
xlab('log2 fold change') +
ylab('-log10 adjusted p-value')

GSEA (all)
Hallmark genesets
# Shrunken LFC
get_fgsea_res(rank_lfc, mm_h) %>% plot_enrichment_table(rank_lfc, mm_h)

# Wald stat
get_fgsea_res(rank_stat, mm_h) %>% plot_enrichment_table(rank_stat, mm_h)

# Rank: sign(LFC) * -log10(pvalue)
get_fgsea_res(rank_pval, mm_h) %>% plot_enrichment_table(rank_pval, mm_h)

GO biological process
# Shrunken LFC
get_fgsea_res(rank_lfc, mm_c5_bp) %>% plot_enrichment_table(rank_lfc, mm_c5_bp)

# Wald stat
get_fgsea_res(rank_stat, mm_c5_bp) %>% plot_enrichment_table(rank_stat, mm_c5_bp)

# Rank: sign(LFC) * -log10(pvalue)
get_fgsea_res(rank_pval, mm_c5_bp) %>% plot_enrichment_table(rank_pval, mm_c5_bp)

GO cellular component
# Shrunken LFC
get_fgsea_res(rank_lfc, mm_c5_cc) %>% plot_enrichment_table(rank_lfc, mm_c5_cc)

# Wald stat
get_fgsea_res(rank_stat, mm_c5_cc) %>% plot_enrichment_table(rank_stat, mm_c5_cc)

# Rank: sign(LFC) * -log10(pvalue)
get_fgsea_res(rank_pval, mm_c5_cc) %>% plot_enrichment_table(rank_pval, mm_c5_cc)

GO molecular function
# Shrunken LFC
get_fgsea_res(rank_lfc, mm_c5_mf) %>% plot_enrichment_table(rank_lfc, mm_c5_mf)

# Wald stat
get_fgsea_res(rank_stat, mm_c5_mf) %>% plot_enrichment_table(rank_stat, mm_c5_mf)

# Rank: sign(LFC) * -log10(pvalue)
get_fgsea_res(rank_pval, mm_c5_mf) %>% plot_enrichment_table(rank_pval, mm_c5_mf)

GSEA (DE)
Hallmark genesets
# Shrunken LFC
get_fgsea_res(rank_lfc, mm_h) %>% plot_enrichment_table(rank_lfc, mm_h)

# Wald stat
get_fgsea_res(rank_stat, mm_h) %>% plot_enrichment_table(rank_stat, mm_h)

# Rank: sign(LFC) * -log10(pvalue)
get_fgsea_res(rank_pval, mm_h) %>% plot_enrichment_table(rank_pval, mm_h)

GO biological process
# Shrunken LFC
get_fgsea_res(rank_lfc, mm_c5_bp) %>% plot_enrichment_table(rank_lfc, mm_c5_bp)

# Wald stat
get_fgsea_res(rank_stat, mm_c5_bp) %>% plot_enrichment_table(rank_stat, mm_c5_bp)

# Rank: sign(LFC) * -log10(pvalue)
get_fgsea_res(rank_pval, mm_c5_bp) %>% plot_enrichment_table(rank_pval, mm_c5_bp)

GO cellular component
# Shrunken LFC
get_fgsea_res(rank_lfc, mm_c5_cc) %>% plot_enrichment_table(rank_lfc, mm_c5_cc)

# Wald stat
get_fgsea_res(rank_stat, mm_c5_cc) %>% plot_enrichment_table(rank_stat, mm_c5_cc)

# Rank: sign(LFC) * -log10(pvalue)
get_fgsea_res(rank_pval, mm_c5_cc) %>% plot_enrichment_table(rank_pval, mm_c5_cc)

GO molecular function
# Shrunken LFC
get_fgsea_res(rank_lfc, mm_c5_mf) %>% plot_enrichment_table(rank_lfc, mm_c5_mf)

# Wald stat
get_fgsea_res(rank_stat, mm_c5_mf) %>% plot_enrichment_table(rank_stat, mm_c5_mf)

# Rank: sign(LFC) * -log10(pvalue)
get_fgsea_res(rank_pval, mm_c5_mf) %>% plot_enrichment_table(rank_pval, mm_c5_mf)

System Info
sessionInfo()
## R version 3.6.3 (2020-02-29)
## Platform: x86_64-apple-darwin15.6.0 (64-bit)
## Running under: macOS Sierra 10.12.6
##
## Matrix products: default
## BLAS: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
##
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
##
## attached base packages:
## [1] parallel stats4 stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] fgsea_1.12.0 Rcpp_1.0.3 RColorBrewer_1.1-2 pheatmap_1.0.12 DESeq2_1.26.0 SummarizedExperiment_1.16.1 DelayedArray_0.12.3 BiocParallel_1.20.1 matrixStats_0.57.0 Biobase_2.46.0 GenomicRanges_1.38.0 GenomeInfoDb_1.22.1 IRanges_2.20.2 S4Vectors_0.24.4 BiocGenerics_0.32.0 scales_1.1.1 forcats_0.4.0 stringr_1.4.0 dplyr_1.0.2 purrr_0.3.3 readr_1.3.1 tidyr_1.0.0 tibble_3.1.0 ggplot2_3.3.3 tidyverse_1.2.1
##
## loaded via a namespace (and not attached):
## [1] colorspace_1.4-1 ellipsis_0.3.0 htmlTable_1.13.3 XVector_0.26.0 base64enc_0.1-3 rstudioapi_0.10 farver_2.1.0 bit64_0.9-7 mvtnorm_1.1-1 apeglm_1.8.0 AnnotationDbi_1.48.0 fansi_0.4.0 lubridate_1.7.4 xml2_1.2.2 splines_3.6.3 geneplotter_1.64.0 knitr_1.25 Formula_1.2-3 jsonlite_1.6 broom_0.7.5 annotate_1.64.0 cluster_2.1.0 png_0.1-7 compiler_3.6.3 httr_1.4.1 backports_1.1.5 assertthat_0.2.1 Matrix_1.2-18 cli_1.1.0 acepack_1.4.1 htmltools_0.5.1.1 tools_3.6.3 coda_0.19-3 gtable_0.3.0 glue_1.4.2 GenomeInfoDbData_1.2.2 fastmatch_1.1-0 bbmle_1.0.23.1 cellranger_1.1.0 jquerylib_0.1.3 vctrs_0.3.4 xfun_0.22 rvest_0.3.5 lifecycle_0.2.0 XML_3.99-0.3 MASS_7.3-51.5 zlibbioc_1.32.0 hms_0.5.2 yaml_2.2.0 memoise_1.1.0 gridExtra_2.3 emdbook_1.3.12 sass_0.3.1 bdsmatrix_1.3-4 rpart_4.1-15 latticeExtra_0.6-29 stringi_1.4.3 RSQLite_2.2.1 genefilter_1.68.0 checkmate_1.9.4 rlang_0.4.8 pkgconfig_2.0.3 bitops_1.0-6 evaluate_0.14 lattice_0.20-38 labeling_0.3 htmlwidgets_1.5.1 bit_1.1-15.1 tidyselect_1.1.0 plyr_1.8.4 magrittr_1.5 R6_2.4.0 generics_0.0.2 Hmisc_4.3-0 DBI_1.1.0 pillar_1.5.1 haven_2.2.0 foreign_0.8-75 withr_2.1.2 survival_3.1-8 RCurl_1.95-4.12 nnet_7.3-12 modelr_0.1.5 crayon_1.3.4 utf8_1.1.4 rmarkdown_2.7 jpeg_0.1-8.1 locfit_1.5-9.4 grid_3.6.3 readxl_1.3.1 data.table_1.13.6 blob_1.2.1 digest_0.6.27 xtable_1.8-4 numDeriv_2016.8-1.1 munsell_0.5.0 bslib_0.2.4